function Nazan_OnCombat(Unit, Event)
Unit:RegisterEvent("Nazan_Spell1", 40000, 0)
Unit:RegisterEvent("Nazan_Spell2", 5000, 0)
Unit:RegisterEvent("Nazan_Spell3", 6000, 0)
Unit:RegisterEvent("Nazan_Spell4", 30000, 0)
end

function Nazan_Spell1(Unit, Event)
Unit:FullCastSpellOnTarget(34653, Unit:GetRandomPlayer())
end

function Nazan_Spell2(Unit, Event)
Unit:FullCastSpellOnTarget(23970, Unit:GetRandomPlayer(0))
end

function Nazan_Spell3(Unit, Event)
Unit:FullCastSpellOnTraget(30926, Unit:GetRandomPlayer(0))
end

function Nazan_Spell4(Unit, Event)
if Unit:GetHealthPtc() < 20 then
Unit:CastSpell(36922)
end

function Nazan_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents() 
end

function Nazan_OnKilledTarget(Unit, Event)
end

function Nazan_OnDied(Unit, Event)
Unit:RemoveEvents() 
end

RegisterUnitEvent(17536, 1, "Nazan_OnCombat")
RegisterUnitEvent(17536, 2, "Nazan_OnLeaveCombat")
RegisterUnitEvent(17536, 3, "Nazan_OnKilledTarget")
RegisterUnitEvent(17536, 4, "Nazan_OnDied")